﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate;
using System.Data;
using System.Data.SQLite;

namespace PlainOldVersionControl.Data.Base
{
    public class CommitDA
    {
        public static DataTable GetCommitHistory()
        {
            string sql = "Select hash as CommitHash, treehash as TreeHash, createddate as CommitDate from commits order by createddate desc";
            SQLiteCommand cmd = DA.GetCommand();
            cmd.CommandText = sql;

            DataTable t = new DataTable();
            SQLiteDataAdapter da = new SQLiteDataAdapter(cmd);
            da.Fill(t);

            return t;
        }
    }
}
